﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EBA.Collections
{
    /// <summary>
    /// 只读数据集合
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IReadonlyList<out T> : IEnumerable<T>, IEnumerable
    {
        /// <summary>
        /// 根据索引获取成员对象
        /// </summary>
        /// <param name="index">索引</param>
        /// <returns></returns>
        T this[int index] { get; }

        /// <summary>
        /// 集合包含的对象的数量
        /// </summary>
        int Count { get; }
    }
}
